<template>
    <column-list :list="list" ></column-list>
</template>

<script lang="ts">
import { defineComponent, computed, onMounted } from 'vue'
import { useStore } from 'vuex'
import { GlobalDataProps } from '@/store/index.ts'
import ColumnList from '@/components/ColumnList.vue'


export default defineComponent({
  name: 'Home',
  components: {
    ColumnList,
  },

  setup() {
    const store = useStore<GlobalDataProps>();
   onMounted(() => {
     store.dispatch("fetchColumns")
   })
    const list = computed(() => store.getters.getColumns)
    return {
      list,
    }
  }
})
</script>
